<%-- 
    Document   : pmListMinestones
    Created on : Jul 1, 2012, 2:45:06 PM
    Author     : ThanhTai
--%>

<%@page import="org.xml.sax.InputSource"%>
<%@page import="org.xml.sax.SAXException"%>
<%@page import="javax.xml.transform.sax.SAXSource"%>
<%@page import="java.io.FileReader"%>
<%@page import="java.io.BufferedReader"%>
<%@page import="javax.xml.validation.Validator"%>
<%@page import="javax.xml.validation.Schema"%>
<%@page import="javax.xml.XMLConstants"%>
<%@page import="javax.xml.validation.SchemaFactory"%>
<%@page import="javax.xml.bind.Unmarshaller"%>
<%@page import="javax.xml.bind.JAXBContext"%>
<%@page import="util.SupportUtil"%>
<%@page import="DTO.Task"%>
<%@page import="DTO.Tasks"%>
<%@page import="DTO.Date"%>
<%@page import="org.w3c.dom.Node"%>
<%@page import="javax.xml.xpath.XPathConstants"%>
<%@page import="org.w3c.dom.NodeList"%>
<%@page import="javax.xml.xpath.XPath"%>
<%@page import="javax.xml.xpath.XPathFactory"%>
<%@page import="java.io.File"%>
<%@page import="org.w3c.dom.Document"%>
<%@page import="javax.xml.parsers.DocumentBuilder"%>
<%@page import="javax.xml.parsers.DocumentBuilderFactory"%>
<%@page import="DTO.OptionForSelect"%>
<%@page import="java.util.ArrayList"%>
<%@page import="BLO.ProjectBLO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>

<style type="text/css">
    @import url("css/general.css");
</style>
<html>
    <head>
        <script type="text/javascript">
            function schange(form){
                var dayList = new Array(
                new Option("1","01"),new Option("2","02"),new Option("3","03"),
                new Option("4","04"),new Option("5","05"),new Option("6","06"),new Option("7","07"),
                new Option("8","08"),new Option("9","09"),new Option("10","10"),new Option("11","11"),
                new Option("12","12"),new Option("13","13"),new Option("14","14"),new Option("15","15"),
                new Option("16","16"),new Option("17","17"),new Option("18","18"),new Option("19","19"),
                new Option("20","20"),new Option("21","21"),new Option("22","22"),new Option("23","23"),
                new Option("24","24"),new Option("25","25"),new Option("26","26"),new Option("27","27"),new Option("28","28"));

                var yId=form.syearId;
                var chosenoption=yId.options[yId.selectedIndex]
                var y = chosenoption.value;

                var mId=form.smonthId;
                var chosenoption1=mId.options[mId.selectedIndex]
                var m = chosenoption1.value;

                if (m=="1" || m=="3"|| m=="5"|| m=="7"|| m=="8"|| m=="10"|| m=="12"){
                    dayList.push(new Option("29","29"));
                    dayList.push(new Option("30","30"));
                    dayList.push(new Option("31","31"));
                } else if (m=="4"|| m=="6"|| m=="9"|| m=="11"){
                    dayList.push(new Option("29","29"));
                    dayList.push(new Option("30","30"));
                } else if (y%4!=0 && m=="2"){
                    dayList.push(new Option("29","29"));
                }
                var myselect=form.sdayId
                while (myselect.length>0){
                    myselect.remove(myselect.length-1);
                }
                //add day
                for (var i = 0; i< dayList.length; i++){
                    try{
                        myselect.add(dayList[i], null);
                    }
                    catch(e){
                        myselect.add(dayList[i]);
                    }
                }
            }

            function echange(form){
                var dayList = new Array(
                new Option("1","01"),new Option("2","02"),new Option("3","03"),
                new Option("4","04"),new Option("5","05"),new Option("6","06"),new Option("7","07"),
                new Option("8","08"),new Option("9","09"),new Option("10","10"),new Option("11","11"),
                new Option("12","12"),new Option("13","13"),new Option("14","14"),new Option("15","15"),
                new Option("16","16"),new Option("17","17"),new Option("18","18"),new Option("19","19"),
                new Option("20","20"),new Option("21","21"),new Option("22","22"),new Option("23","23"),
                new Option("24","24"),new Option("25","25"),new Option("26","26"),new Option("27","27"),new Option("28","28"));

                var yId=form.eyearId;
                var chosenoption=yId.options[yId.selectedIndex]
                var y = chosenoption.value;

                var mId=form.emonthId;
                var chosenoption12 = mId.options[mId.selectedIndex]
                var m = chosenoption12.value;

                if (m=="1" || m=="3"|| m=="5"|| m=="7"|| m=="8"|| m=="10"|| m=="12"){
                    dayList.push(new Option("29","29"));
                    dayList.push(new Option("30","30"));
                    dayList.push(new Option("31","31"));
                } else if (m=="4"|| m=="6"|| m=="9"|| m=="11"){
                    dayList.push(new Option("29","29"));
                    dayList.push(new Option("30","30"));
                } else if (y%4!=0 && m=="2"){
                    dayList.push(new Option("29","29"));
                }
                var myselect=form.edayId;
                while (myselect.length>0){
                    myselect.remove(myselect.length-1);
                }
                //add day
                for (var i = 0; i< dayList.length; i++){
                    try{
                        myselect.add(dayList[i], null);
                    }
                    catch(e){
                        myselect.add(dayList[i]);
                    }
                }
            }

            function validate(){
                var form = document.forms["TaskInfomation"];
                var txtTaskName = form.txtDescription.value;
                var txtDescription = form.txtDescription.value;
                if (txtTaskName==""){
                    window.alert("Task Name NOT EMPTY");
                    return false;
                }
                else if (txtDescription==""){
                    window.alert("Description NOT EMPTY");
                    return false;
                }               
                return true;
            }
        </script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Assign Task Page</title>
    </head>
    <body>
        <jsp:useBean id="taskSAXBean" class="DTO.TaskAddSAXProcessor"/>
        <%
                    String action = request.getParameter("action");
                    Integer projectID;
                    String projectName = request.getParameter("ProjectName");
                    String pathProjects = application.getRealPath("/") + "xml/Projects.xml";
                    String pathMinestone = application.getRealPath("/") + "xml/Minestones.xml";
                    String pathMembers = application.getRealPath("/") + "xml/Members.xml";
                    ProjectBLO blo = new ProjectBLO();
                    blo.getAllProjectOfProjectManager(pathProjects, (String) request.getSession().getAttribute("USERNAME"));
                    blo.getAllMinestonsOfProjectIDList(pathMinestone);
                    blo.getAllMembersOfProjectIDList(pathMembers);
                    if (action.equals("getProjectForAssignTask")) {
                        projectID = Integer.parseInt(request.getParameter("ProjectID"));
                        ArrayList<OptionForSelect> optionMinestone = new ArrayList<OptionForSelect>();
                        ArrayList<OptionForSelect> optionUsername = new ArrayList<OptionForSelect>();
                        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                        DocumentBuilder db;
                        db = dbf.newDocumentBuilder();
                        Document doc;
                        String exp = "";
                        XPathFactory xps;
                        XPath xp;
                        NodeList node;
                        doc = db.parse(new File(pathMinestone));
                        xps = XPathFactory.newInstance();
                        xp = xps.newXPath();
                        exp = "//minestone[projectID=" + projectID + "]";
                        node = (NodeList) xp.evaluate(exp, doc, XPathConstants.NODESET);

                        for (int i = 0; i < node.getLength(); i++) {
                            NodeList minestoneNode = (NodeList) node.item(i);
                            OptionForSelect option = new OptionForSelect();
                            for (int j = 0; j < minestoneNode.getLength(); j++) {
                                Node children = minestoneNode.item(j);
                                if (children.getNodeName().equals("minestoneID")) {
                                    option.setValue(children.getTextContent().trim());
                                }
                                if (children.getNodeName().equals("minestoneName")) {
                                    option.setName(children.getTextContent().trim());
                                }
                            }
                            optionMinestone.add(option);
                        }
                        request.setAttribute("LISTMINESTONE", optionMinestone);

                        doc = db.parse(new File(pathMembers));
                        xps = XPathFactory.newInstance();
                        xp = xps.newXPath();
                        exp = "//member[projectID=" + projectID + "]";
                        node = (NodeList) xp.evaluate(exp, doc, XPathConstants.NODESET);

                        for (int i = 0; i < node.getLength(); i++) {
                            NodeList memberNode = (NodeList) node.item(i);
                            OptionForSelect option = new OptionForSelect();
                            for (int j = 0; j < memberNode.getLength(); j++) {
                                Node children = memberNode.item(j);
                                if (children.getNodeName().equals("username")) {
                                    option.setValue(children.getTextContent().trim());
                                    option.setName(children.getTextContent().trim());
                                }
                            }
                            optionUsername.add(option);
                        }
                        request.setAttribute("LISTUSERNAME", optionUsername);
                        request.setAttribute("ASSIGN", "choosedProject");
                        request.setAttribute("PROJECTNAME", projectName);
                        RequestDispatcher rd = request.getRequestDispatcher("pmAssignTask.jsp?action=choosedProject");
                        rd.forward(request, response);
                    } else if (action.equals("AddTask")) {
                        String txtTaskName = request.getParameter("txtTaskName");
                        Integer ddlMinestone = Integer.parseInt(request.getParameter("ddlMinestone"));
                        String ddlusername = request.getParameter("ddlusername");
                        String Description = request.getParameter("txtDescription");
                        Integer sday = Integer.parseInt(request.getParameter("SDday"));
                        Integer smonth = Integer.parseInt(request.getParameter("SDmonth"));
                        Integer syear = Integer.parseInt(request.getParameter("SDyear"));
                        Integer eday = Integer.parseInt(request.getParameter("EDday"));
                        Integer emonth = Integer.parseInt(request.getParameter("EDmonth"));
                        Integer eyear = Integer.parseInt(request.getParameter("EDyear"));
                        String Status = request.getParameter("ddlStatus");
                        Date start = new Date(syear, smonth, sday);
                        Date end = new Date(eyear, emonth, eday);
                        Tasks tasks = new Tasks();
                        Task task = new Task(txtTaskName, ddlMinestone, ddlusername, Description, start, end, Status);
                        tasks.add(task);
                        SupportUtil util = new SupportUtil();
                        String pathTasks = application.getRealPath("/") + "xml/Tasks.xml";
                        util.marshal(pathTasks, tasks);
                        try {
                            JAXBContext jc = JAXBContext.newInstance("util");
                            Unmarshaller u = jc.createUnmarshaller();
                            SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
                            String pathTasksXSD = application.getRealPath("/") + "xsd/Tasks.xsd";
                            Schema schema = sf.newSchema(new File(pathTasksXSD));
                            Validator validator = schema.newValidator();
                            InputSource inputFile = new InputSource(new BufferedReader(new FileReader(pathTasks)));
                            validator.validate(new SAXSource(inputFile));
                            taskSAXBean.save(pathTasks);
                            request.setAttribute("RESULT", "Add Tasks Successful");
                        } catch (SAXException ex) {
                            request.setAttribute("RESULT", "Error: " + ex.getMessage());
                            ex.printStackTrace();
                        }
                        //taskSAXBean.save(pathTasks);
                        //request.setAttribute("RESULT", "Add User Successful");
                        RequestDispatcher rd = request.getRequestDispatcher("pmAssignTask.jsp?action=AddTask1");
                        rd.forward(request, response);
                    }
        %>
        <div id="wrapper">
            <div id="header">
                <div id="user">
                    ${sessionScope.FULLNAME}, <a href="Controller?action=logout">Log out</a>
                </div>
            </div>

            <div id="body">
                <div id="title">
                    <h2 align="center">Assign Task To Staff</h2>
                </div>
                <div id="content">
                    <div id="left">
                        <table id="Function Reference:" width="200px">
                            <tr>
                                <th>Main Functions:</th>
                            </tr>
                            <tr>
                                <td><a href="Controller?action=MainPage">Update Projects Information</a></td>
                            </tr>
                            <tr>
                                <td><a href="Controller?action=Assign Task to staff">Assign Task to staff</a></td>
                            </tr>
                            <tr>
                                <td><a href="Controller?action=Add Members of Project">Add Members of Project</a></td>
                            </tr>
                        </table>
                    </div>
                    <div id="right">
                        <div id="titleRight">
                        </div>
                        <div id="contenRight">
                            <h3 align="left">Select a Project
                            </h3>
                            <c:import url="xml/Projects.xml" var="xmldoc"/>
                            <c:import url="xsl/ProjectsForAssignTask.xsl" var="xsldoc"/>
                            <x:transform xml="${xmldoc}" xslt="${xsldoc}">
                            </x:transform>
                            <c:if test="${not empty requestScope.ASSIGN}">
                                <h3>Assign Task for Project: ${requestScope.PROJECTNAME}</h3>
                                <form name="TaskInfomation" action="pmAssignTask.jsp" onsubmit="return validate();">
                                    <table border="1">
                                        <tbody>
                                            <tr>
                                                <td>Task Name:</td>
                                                <td><input type="text" name="txtTaskName" value="${requestScope.txtTaskName1}" /> </td>
                                            </tr>
                                            <tr>
                                                <td>Mine stone:</td>
                                                <td>
                                                    <select name="ddlMinestone">
                                                        <c:forEach items="${requestScope.LISTMINESTONE}" var="minestone">
                                                            <option value="${minestone.value}" 
                                                                    <c:if test="${minestone.value}=${requestScope.ddlMinestone1}">selected</c:if>>
                                                                ${minestone.name}
                                                            </option>
                                                        </c:forEach>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Staff:</td>
                                                <td>
                                                    <select name="ddlusername">
                                                        <c:forEach items="${requestScope.LISTUSERNAME}" var="username">
                                                            <option value="${username.value}"
                                                                    <c:if test="${username.value}=${requestScope.ddlusername1}">selected</c:if>>
                                                                ${username.name}
                                                            </option>
                                                        </c:forEach>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Description:</td>
                                                <td><input type="text" name="txtDescription" value="${requestScope.txtDescription1}" /></td>
                                            </tr>
                                            <tr>
                                                <td>Start Day:</td>
                                                <td>
                                                    <select name="SDyear" id="syearId" size="1" onchange="schange(this.form);">
                                                        <option value="2011" <c:if test="${requestScope.SDyear1}='2011'">selected</c:if>>2011</option>
                                                        <option value="2012" <c:if test="${requestScope.SDyear1}='2012'">selected</c:if>>2012</option>
                                                        <option value="2013" <c:if test="${requestScope.SDyear1}='2013'">selected</c:if>>2013</option>
                                                        <option value="2014" <c:if test="${requestScope.SDyear1}='2014'">selected</c:if>>2014</option>
                                                        <option value="2015" <c:if test="${requestScope.SDyear1}='2015'">selected</c:if>>2015</option>
                                                        <option value="2016" <c:if test="${requestScope.SDyear1}='2016'">selected</c:if>>2016</option>
                                                        <option value="2017" <c:if test="${requestScope.SDyear1}='2017'">selected</c:if>>2017</option>
                                                        <option value="2018" <c:if test="${requestScope.SDyear1}='2018'">selected</c:if>>2018</option>
                                                        <option value="2019" <c:if test="${requestScope.SDyear1}='2019'">selected</c:if>>2019</option>
                                                        <option value="2020" <c:if test="${requestScope.SDyear1}='2020'">selected</c:if>>2020</option>
                                                        <option value="2021" <c:if test="${requestScope.SDyear1}='2021'">selected</c:if>>2021</option>
                                                        <option value="2022" <c:if test="${requestScope.SDyear1}='2022'">selected</c:if>>2022</option>
                                                    </select>
                                                    <select name="SDmonth" id="smonthId" size="1" onchange="schange(this.form);">
                                                        <option value="1" <c:if test="${requestScope.SDmonth1}='1'">selected</c:if>>January</option>
                                                        <option value="2" <c:if test="${requestScope.SDmonth1}='2'">selected</c:if>>February</option>
                                                        <option value="3" <c:if test="${requestScope.SDmonth1}='3'">selected</c:if>>March</option>
                                                        <option value="4" <c:if test="${requestScope.SDmonth1}='4'">selected</c:if>>April</option>
                                                        <option value="5" <c:if test="${requestScope.SDmonth1}='5'">selected</c:if>>May</option>
                                                        <option value="6" <c:if test="${requestScope.SDmonth1}='6'">selected</c:if>>June</option>
                                                        <option value="7" <c:if test="${requestScope.SDmonth1}='7'">selected</c:if>>July</option>
                                                        <option value="8" <c:if test="${requestScope.SDmonth1}='8'">selected</c:if>>August</option>
                                                        <option value="9" <c:if test="${requestScope.SDmonth1}='9'">selected</c:if>>September</option>
                                                        <option value="10" <c:if test="${requestScope.SDmonth1}='10'">selected</c:if>>October</option>
                                                        <option value="11" <c:if test="${requestScope.SDmonth1}='11'">selected</c:if>>November</option>
                                                        <option value="12" <c:if test="${requestScope.SDmonth1}='12'">selected</c:if>>December</option>
                                                    </select>
                                                    <select name="SDday" id="sdayId" size="1">
                                                        <option value="1" <c:if test="${requestScope.SDday1}='1'">selected</c:if>>01</option>
                                                        <option value="2" <c:if test="${requestScope.SDday1}='2'">selected</c:if>>02</option>
                                                        <option value="3" <c:if test="${requestScope.SDday1}='3'">selected</c:if>>03</option>
                                                        <option value="4" <c:if test="${requestScope.SDday1}='4'">selected</c:if>>04</option>
                                                        <option value="5" <c:if test="${requestScope.SDday1}='5'">selected</c:if>>05</option>
                                                        <option value="6" <c:if test="${requestScope.SDday1}='6'">selected</c:if>>06</option>
                                                        <option value="7" <c:if test="${requestScope.SDday1}='7'">selected</c:if>>07</option>
                                                        <option value="8" <c:if test="${requestScope.SDday1}='8'">selected</c:if>>08</option>
                                                        <option value="9" <c:if test="${requestScope.SDday1}='9'">selected</c:if>>09</option>
                                                        <option value="10" <c:if test="${requestScope.SDday1}='10'">selected</c:if>>10</option>
                                                        <option value="11" <c:if test="${requestScope.SDday1}='11'">selected</c:if>>11</option>
                                                        <option value="12" <c:if test="${requestScope.SDday1}='12'">selected</c:if>>12</option>
                                                        <option value="13" <c:if test="${requestScope.SDday1}='13'">selected</c:if>>13</option>
                                                        <option value="14" <c:if test="${requestScope.SDday1}='14'">selected</c:if>>14</option>
                                                        <option value="15" <c:if test="${requestScope.SDday1}='15'">selected</c:if>>15</option>
                                                        <option value="16" <c:if test="${requestScope.SDday1}='16'">selected</c:if>>16</option>
                                                        <option value="17" <c:if test="${requestScope.SDday1}='17'">selected</c:if>>17</option>
                                                        <option value="18" <c:if test="${requestScope.SDday1}='18'">selected</c:if>>18</option>
                                                        <option value="19" <c:if test="${requestScope.SDday1}='19'">selected</c:if>>19</option>
                                                        <option value="20" <c:if test="${requestScope.SDday1}='20'">selected</c:if>>20</option>
                                                        <option value="21" <c:if test="${requestScope.SDday1}='21'">selected</c:if>>21</option>
                                                        <option value="22" <c:if test="${requestScope.SDday1}='22'">selected</c:if>>22</option>
                                                        <option value="23" <c:if test="${requestScope.SDday1}='23'">selected</c:if>>23</option>
                                                        <option value="24" <c:if test="${requestScope.SDday1}='24'">selected</c:if>>24</option>
                                                        <option value="25" <c:if test="${requestScope.SDday1}='25'">selected</c:if>>25</option>
                                                        <option value="26" <c:if test="${requestScope.SDday1}='26'">selected</c:if>>26</option>
                                                        <option value="27" <c:if test="${requestScope.SDday1}='27'">selected</c:if>>27</option>
                                                        <option value="28" <c:if test="${requestScope.SDday1}='28'">selected</c:if>>28</option>
                                                        <option value="29" <c:if test="${requestScope.SDday1}='29'">selected</c:if>>29</option>
                                                        <option value="30" <c:if test="${requestScope.SDday1}='30'">selected</c:if>>30</option>
                                                        <option value="31" <c:if test="${requestScope.SDday1}='31'">selected</c:if>>31</option>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>End Day:</td>
                                                <td>
                                                    <select name="EDyear" id="eyearId" size="1" onchange="echange(this.form);">
                                                        <option value="2011" <c:if test="${requestScope.EDyear1}='2011'">selected</c:if>>2011</option>
                                                        <option value="2012" <c:if test="${requestScope.EDyear1}='2012'">selected</c:if>>2012</option>
                                                        <option value="2013" <c:if test="${requestScope.EDyear1}='2013'">selected</c:if>>2013</option>
                                                        <option value="2014" <c:if test="${requestScope.EDyear1}='2014'">selected</c:if>>2014</option>
                                                        <option value="2015" <c:if test="${requestScope.EDyear1}='2015'">selected</c:if>>2015</option>
                                                        <option value="2016" <c:if test="${requestScope.EDyear1}='2016'">selected</c:if>>2016</option>
                                                        <option value="2017" <c:if test="${requestScope.EDyear1}='2017'">selected</c:if>>2017</option>
                                                        <option value="2018" <c:if test="${requestScope.EDyear1}='2018'">selected</c:if>>2018</option>
                                                        <option value="2019" <c:if test="${requestScope.EDyear1}='2019'">selected</c:if>>2019</option>
                                                        <option value="2020" <c:if test="${requestScope.EDyear1}='2020'">selected</c:if>>2020</option>
                                                        <option value="2021" <c:if test="${requestScope.EDyear1}='2021'">selected</c:if>>2021</option>
                                                        <option value="2022" <c:if test="${requestScope.EDyear1}='2022'">selected</c:if>>2022</option>
                                                    </select>
                                                    <select name="EDmonth" id="emonthId" size="1" onchange="echange(this.form);">
                                                        <option value="1" <c:if test="${requestScope.EDmonth1}='1'">selected</c:if>>January</option>
                                                        <option value="2" <c:if test="${requestScope.EDmonth1}='2'">selected</c:if>>February</option>
                                                        <option value="3" <c:if test="${requestScope.EDmonth1}='3'">selected</c:if>>March</option>
                                                        <option value="4" <c:if test="${requestScope.EDmonth1}='4'">selected</c:if>>April</option>
                                                        <option value="5" <c:if test="${requestScope.EDmonth1}='5'">selected</c:if>>May</option>
                                                        <option value="6" <c:if test="${requestScope.EDmonth1}='6'">selected</c:if>>June</option>
                                                        <option value="7" <c:if test="${requestScope.EDmonth1}='7'">selected</c:if>>July</option>
                                                        <option value="8" <c:if test="${requestScope.EDmonth1}='8'">selected</c:if>>August</option>
                                                        <option value="9" <c:if test="${requestScope.EDmonth1}='9'">selected</c:if>>September</option>
                                                        <option value="10" <c:if test="${requestScope.EDmonth1}='10'">selected</c:if>>October</option>
                                                        <option value="11" <c:if test="${requestScope.EDmonth1}='11'">selected</c:if>>November</option>
                                                        <option value="12" <c:if test="${requestScope.EDmonth1}='12'">selected</c:if>>December</option>
                                                    </select>
                                                    <select name="EDday" id="edayId" size="1">
                                                        <option value="1" <c:if test="${requestScope.EDday1}='1'">selected</c:if>>01</option>
                                                        <option value="2" <c:if test="${requestScope.EDday1}='2'">selected</c:if>>02</option>
                                                        <option value="3" <c:if test="${requestScope.EDday1}='3'">selected</c:if>>03</option>
                                                        <option value="4" <c:if test="${requestScope.EDday1}='4'">selected</c:if>>04</option>
                                                        <option value="5" <c:if test="${requestScope.EDday1}='5'">selected</c:if>>05</option>
                                                        <option value="6" <c:if test="${requestScope.EDday1}='6'">selected</c:if>>06</option>
                                                        <option value="7" <c:if test="${requestScope.EDday1}='7'">selected</c:if>>07</option>
                                                        <option value="8" <c:if test="${requestScope.EDday1}='8'">selected</c:if>>08</option>
                                                        <option value="9" <c:if test="${requestScope.EDday1}='9'">selected</c:if>>09</option>
                                                        <option value="10" <c:if test="${requestScope.EDday1}='10'">selected</c:if>>10</option>
                                                        <option value="11" <c:if test="${requestScope.EDday1}='11'">selected</c:if>>11</option>
                                                        <option value="12" <c:if test="${requestScope.EDday1}='12'">selected</c:if>>12</option>
                                                        <option value="13" <c:if test="${requestScope.EDday1}='13'">selected</c:if>>13</option>
                                                        <option value="14" <c:if test="${requestScope.EDday1}='14'">selected</c:if>>14</option>
                                                        <option value="15" <c:if test="${requestScope.EDday1}='15'">selected</c:if>>15</option>
                                                        <option value="16" <c:if test="${requestScope.EDday1}='16'">selected</c:if>>16</option>
                                                        <option value="17" <c:if test="${requestScope.EDday1}='17'">selected</c:if>>17</option>
                                                        <option value="18" <c:if test="${requestScope.EDday1}='18'">selected</c:if>>18</option>
                                                        <option value="19" <c:if test="${requestScope.EDday1}='19'">selected</c:if>>19</option>
                                                        <option value="20" <c:if test="${requestScope.EDday1}='20'">selected</c:if>>20</option>
                                                        <option value="21" <c:if test="${requestScope.EDday1}='21'">selected</c:if>>21</option>
                                                        <option value="22" <c:if test="${requestScope.EDday1}='22'">selected</c:if>>22</option>
                                                        <option value="23" <c:if test="${requestScope.EDday1}='23'">selected</c:if>>23</option>
                                                        <option value="24" <c:if test="${requestScope.EDday1}='24'">selected</c:if>>24</option>
                                                        <option value="25" <c:if test="${requestScope.EDday1}='25'">selected</c:if>>25</option>
                                                        <option value="26" <c:if test="${requestScope.EDday1}='26'">selected</c:if>>26</option>
                                                        <option value="27" <c:if test="${requestScope.EDday1}='27'">selected</c:if>>27</option>
                                                        <option value="28" <c:if test="${requestScope.EDday1}='28'">selected</c:if>>28</option>
                                                        <option value="29" <c:if test="${requestScope.EDday1}='29'">selected</c:if>>29</option>
                                                        <option value="30" <c:if test="${requestScope.EDday1}='30'">selected</c:if>>30</option>
                                                        <option value="31" <c:if test="${requestScope.EDday1}='31'">selected</c:if>>31</option>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Status Day:</td>
                                                <td>
                                                    <select name="ddlStatus">                                                        
                                                        <option>on-going</option>
                                                        <option>finish</option>
                                                        <option>check Fails</option>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                </td>
                                                <td>
                                                    <input type="submit" name="action" value="AddTask" />
                                                    <input type="reset" value="Reset" />
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </form>
                            </c:if>
                            <h4 align="left" style="color: red;">${requestScope.RESULT}</h4>
                        </div>
                    </div>
                </div>
            </div>
            <div id="footer">
            </div>
        </div>
    </body>
</html>
